
import request from '../utils/request'
// 商品类型接口
// 商品类型列表
const findAllTypes = () => {
return request({
        url: "/api/type/getAllType",
        method: "get",
    })
}
    // 新增商品类型
const addType = (type) => {
    return request({
        url: "/api/type/addType",
        method: "post",
        headers: { "Content-Type": "application/json;charset=utf-8" },
        data: type
    })
}
// 删除商品类型
const deleteTypeById = (id) => {
    return request({
        url: `/api/type/typeDelete?tid=${id}`,
        method: "post"
    })
}
// 更新商品类型
const updateType = (type) => {
    return request({
        url: "/api/type/updateType",
        method: "post",
        headers: { "Content-Type": "application/json;charset=utf-8" },
        data: type
    })
}
export {
    findAllTypes,
    addType,
    deleteTypeById,
    updateType
}
